//SSAOBlurCSFX.h
//Created 20/01/14
//Created By Daniel Bowler
//
//Preforms a bilateral blur on the compute shader. 

#pragma once

//We will inherit from the AbstractComputeFX (Rather than just the 
//AbstractCompute) because this is a compute shader effect.
#include "AbstractComputeFX.h"

//To get access to the #define that decides if we are going to write
//to a third texture (UAV) which tells us the maximum Z value for each tile. We can, for example,
//disable the function that sets the UAV (compile time) when it is disabled.
#include "GraphicsManager.h"

class SSAOBlurCSFX : public AbstractComputeFX
{
	//Shader Manager will create and manage an instance of this effect. The programmer
	//(In this case, the programmer who is developing the GraphicsManager) will ask
	//the shader manager to return a pointer to this effect.
	friend ShaderManager;
public:
	//Functions to set data.
	void SetTextures(ID3D11ShaderResourceView* input, ID3D11UnorderedAccessView* output);

private:
	//We dont want the user to directly create one of these (They work with
	//pointers), so hide the constructor/destructors. 
	SSAOBlurCSFX(ID3D11Device* device);
	~SSAOBlurCSFX();
	//Disable the copy constructor and the = operator
	SSAOBlurCSFX(const SSAOBlurCSFX& other);
	SSAOBlurCSFX& operator = (const SSAOBlurCSFX& other);

	//Override this to aid in creating the FX class properly.
	void InitShaderVariablePointers();
private:
	//Shader Variables
	//
	//Fed in as input - this will be blured in to the output texture
	ID3DX11EffectShaderResourceVariable* inputVar;
	//Output from the effect (and maybe fed back in as input for a second
	//pass blur) representing the post blured image. 
	ID3DX11EffectUnorderedAccessViewVariable* outputVar;
};